package com.kedacom.ctsp.authority.dto;


import com.kedacom.ctsp.web.entity.CloneableEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据字段权限 行级访问权限
 *
 * @author
 */
@Data
@EqualsAndHashCode(of = "name")
public class FieldDTO implements CloneableEntity {
    private String name;

    private String description;

    private Integer status;

    private Boolean checked = false;

    public FieldDTO() {
    }

    public FieldDTO(String name) {
        this.name = name;
    }

    public FieldDTO(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public FieldDTO(String name, String description, Integer status) {
        this.name = name;
        this.description = description;
        this.status = status;
    }

    @Override
    public FieldDTO clone() {
        FieldDTO optionalField = new FieldDTO();
        optionalField.setName(name);
        optionalField.setDescription(description);
        optionalField.setStatus(status);
        return optionalField;
    }
}
